A DC-to-DC converter drives a DC load such as one or more light-emitting diodes (LEDs) or the like. The converter includes a DC-to-AC inverter in a primary circuit. The inverter generates a switched AC voltage, which is applied to the primary winding of an isolation transformer. A secondary winding provides an input to an AC-to-DC rectifier in a secondary circuit. The rectifier produces a DC voltage, which is applied to the load. The magnitude of a load current flowing through the load is sensed and compared to a reference magnitude. An operational amplifier or other comparator in the secondary circuit generates a feedback signal in response to a difference between the sensed current magnitude and the reference magnitude. The feedback signal is applied to an optocoupler having an input stage in the secondary circuit and having an output stage in the primary circuit. The output stage of the optocoupler has a variable impedance that is coupled to a current control circuit by an impedance control circuit. The current control circuit controls a frequency control current flowing from a control terminal of a switch controller integrated circuit in the DC-to-AC inverter. The variable impedance modifies the frequency control current. The switch controller is responsive to the frequency control current to vary the frequency of the switched AC voltage. Varying the frequency of the AC voltage varies the magnitude of the load current. In some circumstances, the impedance control circuit is highly sensitive to small changes in the impedance of the output stage of the optocoupler such that the load current may change during normal operation and cause the light produced by the LEDs to flicker.